home *** CD-ROM | disk | FTP | other *** search
- /*
- * postquel functions can also take multiple arguments. Arguments may
- * be either base types or complex types (classes).
- */
-
- /*
- * this function raisers the salary of an employee and returns 'true'.
- * by convention, the return value of a postquel procedure is the
- * value produced by the last query in the procedure -- in this case,
- * the 'retrieve'.
- */
-
- define function raise_sal (language = "postquel", returntype = bool)
- arg is (char16, int4)
- as "replace e (salary = e.salary + $2) from e in emp
- where e.name = $1
- retrieve (x = \\"t\\"::bool)"
-
- \p
- \g
-
- /* give mike a raise -- have to typecast the char16 arg */
- retrieve (x = raise_sal("sam"::char16, 100))
- \p
- \g
-